﻿@using ST = EmoneyWeiXinCommon.StringTools

@{
    Layout = null;
}
<!DOCTYPE html>

<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <title>Left</title>
    <link href="@ST.GetStaticFile("Models/css/basic.css")" rel="stylesheet" />
    <script src="@ST.GetStaticFile("Scripts/jquery-1.8.3.min.js")"></script>
</head>
<body>
    <section class="section">
        <div class="left" style="overflow-y: auto; SCROLLBAR-FACE-COLOR: #2E3740; SCROLLBAR-HIGHLIGHT-COLOR: #2E3740; SCROLLBAR-SHADOW-COLOR: #2E3740; SCROLLBAR-3DLIGHT-COLOR: #2E3740; SCROLLBAR-ARROW-COLOR: #2E3740; SCROLLBAR-TRACK-COLOR: #2E3740; SCROLLBAR-DARKSHADOW-COLOR: #2E3740;">

            @{
                List<EmoneyWeiXinEntity.leftmemuEntity> listMemu = ViewBag.ListLeftMemu;
                if (listMemu == null || listMemu.Count < 1)
                {
                    listMemu = new List<EmoneyWeiXinEntity.leftmemuEntity>();
                }
                Layout = null;

                var queryList = listMemu.Where(x => x.hisid == 0).ToList();
                string classname = "";


                for (int i = 0; i < queryList.Count; i++)
                {
                    if (i == 0)
                    {
                        classname = " class=on";
                    }
                    else
                    {
                        classname = "";
                    }
                    var querylist1 = listMemu.Where(x => x.hisid == queryList[i].id).ToList();
                    if (querylist1 != null && querylist1.Count > 0)
                    {
                <dl @classname>
                    <dt><a href="javascript:void(0);">@queryList[i].title</a><em></em></dt>
                    <dd>
                        @{for (int j = 0; j < querylist1.Count; j++)
                          {
                            <p><a href="@ST.GetStaticFile(querylist1[j].href + "?leftid=" + querylist1[j].id)" target="main">@querylist1[j].title</a></p>
                          }
                        }
                    </dd>
                </dl>
                    }
                }
       
            }
        </div>
    </section>

    <script>
        $(document).ready(function () {
            $(".left dl dt").click(function () {
                $(this).parents("dl").addClass("on");
                $(this).parents("dl").siblings("dl").removeClass("on");
            })
        });

    </script>
</body>
</html>
